package junior.db.dao.mybatis.type;

import org.apache.ibatis.type.Alias;

@Alias("mybatis")
public class TypeValue {
    private Object value;
    private String type;
    private Class<?> valueType;
    
    public TypeValue(Object value, String type, Class<?> valueType) {
        this.value = value;
        this.type = type;
        this.valueType = valueType;
    }
    
    public String toString() {
        return value != null ? value.toString() : null;
    }
    
    public Object getValue() {
        return value;
    }
    
    public String getType() {
        return type;
    }
    
    public Class<?> getValueType() {
        return valueType;
    }
}
